<%@page import="java.util.List"%>
<%@page import="com.webshopping.entry.*"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
   // System.out.println(path);
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>用户信息修改页面</title>
<script type="text/javascript" src="<%=path%>/js/common.js"></script>
<script type="text/javascript">
function init(){
	//alert(${userInfoUp.id});
	//注意Javascript获取springMVC传递的数据：
	//如果是字符串类型，加单引号''
	//如果是数值直接输出
	setSelected("attribute",'${userInfoUp.attribute}');
	setSelected("sex",'${userInfoUp.sex}');
	//alert("end");
	
}
	
</script>
</head>

<body onload="init()">

	<form action="<%=path%>/user/updateUser.do" method="post">
	<input type="hidden" name="id" value="${userInfoUp.id} "/>
		<table >
			<tr>
				<td>用户名</td>
				<td><input type="text" name="userName" value="${userInfoUp.userName}"/></td>
			</tr>
			<tr>
				<td>密码</td>
				<td><input type="text" name="password" value="${userInfoUp.password}" /></td>
			</tr>
			
			<tr>
				<td>身份</td>
				<td>
				   <select name="attribute" id="attribute">
						<option value="GLY" >管理员</option>						
						<option value="YH" >用户</option>
				   </select>
				</td>
			</tr>
			<tr>
				<td>性别</td>
				<td>
				   <select name="sex" id="sex">
						<option value="boy" >男</option>						
						<option value="girl">女</option>
				   </select>
				</td>
			</tr>
			
			
			
			<tr>
			<td><input type="submit" value="更改信息" /></td>
			<td><input type="button" value="重置" /></td>
			</tr>
			
		</table>
	</form>
</body>
</html>